<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        let op1 = prompt("请输入第一个数");
        let op2 = prompt("请输入第2个数");
        let op3 = prompt("请输入一个符号");
        let res;
        opp1=parseFloat(op1);
        opp2=parseFloat(op2);
        switch(op3){
            case "+":
                res = opp1+opp2;
                break;
            default:
                // alert("错了")
        }
        alert(res)

        


    </script>
</head>
<body>
    
</body>
</html>